package com.pearadmin.encode.service.impl;

import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.pearadmin.common.nucleus.domain.request.PageParam;
import com.pearadmin.encode.domain.meta.MetaTable;
import com.pearadmin.encode.mapper.MetaDataMapper;
import com.pearadmin.encode.service.IMetaDataService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class MetaDataServiceImpl implements IMetaDataService {

    @Resource
    private MetaDataMapper metaDataMapper;

    @Override
    public PageInfo<MetaTable> queryTable(PageParam pageParam) {
        PageHelper.startPage(pageParam.getPage(),pageParam.getLimit());
        List<MetaTable> list = metaDataMapper.queryTable();
        return new PageInfo<>(list);
    }
}
